//
//  UIView+Alignment.h
//  JSToolkit
//
//  Created by 정재성 on 2013. 11. 2..
//  Copyright (c) 2013년 정재성. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, UIViewAlignment)
{
    UIViewAlignmentTop                  = 1 << 0,
    UIViewAlignmentBottom               = 1 << 1,
    UIViewAlignmentLeft                 = 1 << 2,
    UIViewAlignmentRight                = 1 << 3,
    UIViewAlignmentCenterHorizontal     = 1 << 4,
    UIViewAlignmentCenterVertical       = 1 << 5,
    UIViewAlignmentCenter               = UIViewAlignmentCenterHorizontal | UIViewAlignmentCenterVertical
};

@interface UIView (Alignment)

- (void)alignmentTo:(UIViewAlignment)alignment;
- (void)alignmentTo:(UIViewAlignment)alignment margins:(UIEdgeInsets)margins;
- (void)alignmentTo:(UIViewAlignment)alignment ofRect:(CGRect)rect;
- (void)alignmentTo:(UIViewAlignment)alignment ofRect:(CGRect)rect margins:(UIEdgeInsets)margins;

@end
